<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

/**
 * App\Wechat
 *
 * @property int $id
 * @property string|null $adgroup_id
 * @property string|null $adgroup_name
 * @property string|null $campaign_id
 * @property string|null $click_id
 * @property string|null $campaign_name
 * @property string|null $leads_info
 * @property string|null $agency_id
 * @property string|null $agency_name
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Wechat newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Wechat newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Wechat query()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Wechat whereAdgroupId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Wechat whereAdgroupName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Wechat whereAgencyId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Wechat whereAgencyName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Wechat whereCampaignId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Wechat whereCampaignName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Wechat whereClickId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Wechat whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Wechat whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Wechat whereLeadsInfo($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Wechat whereUpdatedAt($value)
 * @mixin \Eloquent
 */
class Wechat extends Model
{
    protected  $table='5kcrm_crm_wechat';
    public function  setLeadsInfoAttribute($value)
    {
        $this->attributes['leads_info']=json_encode($value);
    }
    public function  getLeadsInfoAttribute($value)
    {
        return json_decode($value,true);
    }
}
